package com.ruoyi;
import com.coupang.openapi.sdk.Hmac;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.io.IOException;

/**
 * Coupang 商品注册测试类
 */
public class ProductRegistration {

    private static final String HOST = "api-gateway.coupang.com";
    private static final int PORT = 443;
    private static final String SCHEMA = "https";
    
    //replace with your own accessKey
    private static final String ACCESS_KEY = "fe8a5ff1-28be-4a36-8694-577cc7960166";
    //replace with your own secretKey
    private static final String SECRET_KEY = "f05224e25ebb0c237564da5cce5be106926c7930";

    public void registerProduct() {
        //params
        String method = "POST";
        String vendorId = "A158000DM0";
        // 商品注册 API 路径
        String path = "/v2/providers/seller_api/apis/api/v1/marketplace/seller-products";

        // 商品注册 JSON 数据
        // ✅ 根据 Coupang 官方文档配置运费（重要！）：
        // 官方文档：https://developers.coupangcorp.com/hc/zh-cn/articles/360033877853
        //
        // ✅ 根据官方文档完整配置所有必填字段
        // 参考：https://developers.coupangcorp.com/hc/zh-cn/articles/360033877853
        //
        // 📋 必填字段清单（已全部添加）：
        // 1. 基本信息：
        //    - displayCategoryCode: 66482 (美妆-卸妆油分类)
        //    - sellerProductName: 注册商品名
        //    - vendorId: 卖家ID
        //    - saleStartedAt/saleEndedAt: 销售日期
        //
        // 2. 配送信息：
        //    - deliveryMethod: SEQUENTIAL (顺序配送)
        //    - deliveryCompanyCode: KDEXP (物流公司)
        //    - deliveryChargeType: FREE (免运费)
        //    - deliveryCharge: 0 (基本运费)
        //    - freeShipOverAmount: 0 (免运费门槛)
        //    - deliveryChargeOnReturn: 2500 (初始退货运费)
        //    - remoteAreaDeliverable: N (不支持偏远地区)
        //    - unionDeliveryType: NONE (不捆绑配送)
        //
        // 3. 退货地址信息：
        //    - returnCenterCode: 1002336951 (退货中心代码)
        //    - returnChargeName: 판매자 (退货地名称)
        //    - companyContactNumber: 联系电话
        //    - returnZipCode: 邮政编码
        //    - returnAddress: 退货地址
        //    - returnAddressDetail: 详细地址
        //    - returnCharge: 2500 (退货运费)
        //    - outboundShippingPlaceCode: 1002336951 (发货地代码)
        //
        // 4. 其他：
        //    - vendorUserId: Wing用户ID
        //    - requested: true (自动申请批准)
        //    - items: 商品属性列表
        //
        // ⚠️ 重要提示：
        // - returnCenterCode 和 outboundShippingPlaceCode 必须使用您账号中实际配置的代码
        // - 退货地址信息必须真实有效
        // - 联系电话格式需要符合韩国电话号码规范
        //
        String strjson = "{\n" +
                "  \"displayCategoryCode\": 66482,\n" +
                "  \"sellerProductName\": \"test_클렌징오일_관리용_상품명\",\n" +
                "  \"vendorId\": \"" + vendorId + "\",\n" +
                "  \"saleStartedAt\": \"2025-10-16T00:00:00\",\n" +
                "  \"saleEndedAt\": \"2099-01-01T23:59:59\",\n" +
                "  \"displayProductName\": \"해피바스 솝베리 클렌징 오일\",\n" +
                "  \"brand\": \"해피바스\",\n" +
                "  \"generalProductName\": \"솝베리 클렌징 오일\",\n" +
                "  \"productGroup\": \"클렌징 오일\",\n" +
                "  \"deliveryMethod\": \"SEQUENTIAL\",\n" +
                "  \"deliveryCompanyCode\": \"KDEXP\",\n" +
                "  \"deliveryChargeType\": \"FREE\",\n" +
                "  \"deliveryCharge\": 0,\n" +
                "  \"freeShipOverAmount\": 0,\n" +
                "  \"deliveryChargeOnReturn\": 2500,\n" +
                "  \"remoteAreaDeliverable\": \"N\",\n" +
                "  \"unionDeliveryType\": \"UNION_DELIVERY\",\n" +
                "  \"returnCenterCode\": \"1002336951\",\n" +
                "  \"returnChargeName\": \"반품지_1\",\n" +
                "  \"companyContactNumber\": \"02-1234-5678\",\n" +
                "  \"returnZipCode\": \"06236\",\n" +
                "  \"returnAddress\": \"서울특별시 강남구 테헤란로\",\n" +
                "  \"returnAddressDetail\": \"123호\",\n" +
                "  \"returnCharge\": 2500,\n" +
                "  \"outboundShippingPlaceCode\": \"1002336951\",\n" +
                "  \"vendorUserId\": \"zoejnson\",\n" +
                "  \"requested\": true,\n" +
                "  \"manufacture\": \"아모레퍼시픽\",\n" +
                "  \"bundleInfo\": {\n" +
                "    \"bundleType\": \"SINGLE\"\n" +
                "  },\n" +
                "  \"items\": [\n" +
                "    {\n" +
                "      \"itemName\": \"200ml_1개\",\n" +
                "      \"originalPrice\": 13000,\n" +
                "      \"salePrice\": 10000,\n" +
                "      \"maximumBuyCount\": \"100\",\n" +
                "      \"maximumBuyForPerson\": \"0\",\n" +
                "      \"outboundShippingTimeDay\": \"1\",\n" +
                "      \"maximumBuyForPersonPeriod\": \"1\",\n" +
                "      \"unitCount\": 1,\n" +
                "      \"adultOnly\": \"EVERYONE\",\n" +
                "      \"taxType\": \"TAX\",\n" +
                "      \"parallelImported\": \"NOT_PARALLEL_IMPORTED\",\n" +
                "      \"overseasPurchased\": \"NOT_OVERSEAS_PURCHASED\",\n" +
                "      \"pccNeeded\": \"false\",\n" +
                "      \"externalVendorSku\": \"0001\",\n" +
                "      \"barcode\": \"\",\n" +
                "      \"emptyBarcode\": true,\n" +
                "      \"emptyBarcodeReason\": \"상품확인불가_바코드없음사유\",\n" +
                "      \"modelNo\": \"171717\",\n" +
                "      \"extraProperties\": {\n" +
                "        \"coupangSalePrice\": 5000,\n" +
                "        \"onlineSalePriceForBooks\": 10000,\n" +
                "        \"transactionType\": \"manufacturer\",\n" +
                "        \"businessType\": \"Beauty\"\n" +
                "      },\n" +
                "      \"certifications\": [\n" +
                "        {\n" +
                "          \"certificationType\": \"NOT_REQUIRED\",\n" +
                "          \"certificationCode\": \"\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"searchTags\": [\"검색어1\", \"검색어2\"],\n" +
                "      \"images\": [\n" +
                "        {\n" +
                "          \"imageOrder\": 0,\n" +
                "          \"imageType\": \"REPRESENTATION\",\n" +
                "          \"vendorPath\": \"http://image11.coupangcdn.com/image/product/image/vendoritem/2018/06/25/3719529368/27a6b898-ff3b-4a27-b1e4-330a90c25e9c.jpg\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"imageOrder\": 1,\n" +
                "          \"imageType\": \"DETAIL\",\n" +
                "          \"vendorPath\": \"http://image11.coupangcdn.com/image/product/image/vendoritem/2017/02/21/3000169918/34b79649-d625-4f49-a260-b78bf7a573a8.jpg\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"imageOrder\": 2,\n" +
                "          \"imageType\": \"DETAIL\",\n" +
                "          \"vendorPath\": \"http://image11.coupangcdn.com/image/product/image/vendoritem/2018/06/28/3000169918/5716aa61-70bd-47cd-8f3d-f3d49e7f496d.jpg\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"notices\": [\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"용량(중량)\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"제품 주요 사양\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"사용기한 또는 개봉 후 사용기간\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"사용방법\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"제조업자 및 제조판매업자\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"제조국\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"화장품법에 따라 기재, 표시하여야 하는 모든 성분\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"식품의약품안전처 심사 필 유무\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"사용할 때 주의사항\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"품질보증기준\",\n" +
                "          \"content\": \"제품 이상 시 공정거래위원회 고시 소비자분쟁해결기준에 의거 보상합니다.\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"소비자상담관련 전화번호\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"attributes\": [\n" +
                "        {\n" +
                "          \"attributeTypeName\": \"수량\",\n" +
                "          \"attributeValueName\": \"1개\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"attributeTypeName\": \"개당 용량\",\n" +
                "          \"attributeValueName\": \"200ml\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"contents\": [\n" +
                "        {\n" +
                "          \"contentsType\": \"TEXT\",\n" +
                "          \"contentDetails\": [\n" +
                "            {\n" +
                "              \"content\": \"<html><div></div><div><img src='http://image11.coupangcdn.com/image/product/content/vendorItem/2018/06/26/196713/738d905f-ed80-4fd8-ad21-ed87b195a19e.jpg' /></div></html>\",\n" +
                "              \"detailType\": \"TEXT\"\n" +
                "            }\n" +
                "          ]\n" +
                "        }\n" +
                "      ],\n" +
                "      \"offerCondition\": \"NEW\",\n" +
                "      \"offerDescription\": \"\"\n" +
                "    },\n" +
                "    {\n" +
                "      \"itemName\": \"200ml_2개\",\n" +
                "      \"originalPrice\": 26000,\n" +
                "      \"salePrice\": 20000,\n" +
                "      \"maximumBuyCount\": \"100\",\n" +
                "      \"maximumBuyForPerson\": \"0\",\n" +
                "      \"outboundShippingTimeDay\": \"2\",\n" +
                "      \"maximumBuyForPersonPeriod\": \"1\",\n" +
                "      \"unitCount\": 1,\n" +
                "      \"adultOnly\": \"EVERYONE\",\n" +
                "      \"taxType\": \"TAX\",\n" +
                "      \"parallelImported\": \"NOT_PARALLEL_IMPORTED\",\n" +
                "      \"overseasPurchased\": \"NOT_OVERSEAS_PURCHASED\",\n" +
                "      \"pccNeeded\": \"false\",\n" +
                "      \"externalVendorSku\": \"0002\",\n" +
                "      \"barcode\": \"\",\n" +
                "      \"emptyBarcode\": true,\n" +
                "      \"emptyBarcodeReason\": \"상품확인불가_바코드없음사유\",\n" +
                "      \"modelNo\": \"171717\",\n" +
                "      \"extraProperties\": {\n" +
                "        \"coupangSalePrice\": 10000,\n" +
                "        \"onlineSalePriceForBooks\": 20000,\n" +
                "        \"transactionType\": \"manufacturer\",\n" +
                "        \"businessType\": \"Beauty\"\n" +
                "      },\n" +
                "      \"certifications\": [\n" +
                "        {\n" +
                "          \"certificationType\": \"NOT_REQUIRED\",\n" +
                "          \"certificationCode\": \"\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"searchTags\": [\"검색어1\", \"검색어2\"],\n" +
                "      \"images\": [\n" +
                "        {\n" +
                "          \"imageOrder\": 0,\n" +
                "          \"imageType\": \"REPRESENTATION\",\n" +
                "          \"vendorPath\": \"http://image11.coupangcdn.com/image/product/image/vendoritem/2018/06/26/3001519145/74100e2a-d1ad-4b50-9c78-840c12a3e10d.jpg\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"imageOrder\": 1,\n" +
                "          \"imageType\": \"DETAIL\",\n" +
                "          \"vendorPath\": \"http://image11.coupangcdn.com/image/product/image/vendoritem/2017/02/21/3000169918/34b79649-d625-4f49-a260-b78bf7a573a8.jpg\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"imageOrder\": 2,\n" +
                "          \"imageType\": \"DETAIL\",\n" +
                "          \"vendorPath\": \"http://image11.coupangcdn.com/image/product/image/vendoritem/2018/06/28/3000169918/5716aa61-70bd-47cd-8f3d-f3d49e7f496d.jpg\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"notices\": [\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"용량(중량)\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"제품 주요 사양\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"사용기한 또는 개봉 후 사용기간\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"사용방법\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"제조업자 및 제조판매업자\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"제조국\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"화장품법에 따라 기재, 표시하여야 하는 모든 성분\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"식품의약품안전처 심사 필 유무\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"사용할 때 주의사항\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"품질보증기준\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"noticeCategoryName\": \"화장품\",\n" +
                "          \"noticeCategoryDetailName\": \"소비자상담관련 전화번호\",\n" +
                "          \"content\": \"상세페이지 참조\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"attributes\": [\n" +
                "        {\n" +
                "          \"attributeTypeName\": \"수량\",\n" +
                "          \"attributeValueName\": \"2개\"\n" +
                "        },\n" +
                "        {\n" +
                "          \"attributeTypeName\": \"개당 용량\",\n" +
                "          \"attributeValueName\": \"200ml\"\n" +
                "        }\n" +
                "      ],\n" +
                "      \"contents\": [\n" +
                "        {\n" +
                "          \"contentsType\": \"TEXT\",\n" +
                "          \"contentDetails\": [\n" +
                "            {\n" +
                "              \"content\": \"<html><div></div><div><img src='http://image11.coupangcdn.com/image/product/content/vendorItem/2018/06/26/196713/738d905f-ed80-4fd8-ad21-ed87b195a19e.jpg' /></div></html>\",\n" +
                "              \"detailType\": \"TEXT\"\n" +
                "            }\n" +
                "          ]\n" +
                "        }\n" +
                "      ],\n" +
                "      \"offerCondition\": \"NEW\",\n" +
                "      \"offerDescription\": \"\"\n" +
                "    }\n" +
                "  ],\n" +
                "  \"requiredDocuments\": [\n" +
                "    {\n" +
                "      \"templateName\": \"기타인증서류\",\n" +
                "      \"vendorDocumentPath\": \"http://image11.coupangcdn.com/image/product/content/vendorItem/2018/07/02/41579010/eebc0c30-8f35-4a51-8ffd-808953414dc1.jpg\"\n" +
                "    }\n" +
                "  ],\n" +
                "  \"extraInfoMessage\": \"\"\n" +
                "}";

        CloseableHttpClient client = null;
        try {
            //create client
            client = HttpClients.createDefault();
            
            /********************************************************/
            //authorize, demonstrate how to generate hmac signature here
            // 注意：签名时使用的 path 必须与实际请求的 path 完全一致
            String authorization = Hmac.generate(method, path, SECRET_KEY, ACCESS_KEY);
            //print out the hmac key
            System.out.println(authorization);
            System.out.println("签名消息内容检查:");
            System.out.println("Method: " + method);
            System.out.println("Path: " + path);
            /********************************************************/

            //build uri
            URIBuilder uriBuilder = new URIBuilder()
                    .setScheme(SCHEMA)
                    .setHost(HOST)
                    .setPort(PORT)
                    .setPath(path);
            
            HttpPost requestPost = new HttpPost(uriBuilder.build().toString());

            StringEntity params = new StringEntity(strjson, "UTF-8");

            /********************************************************/
            // set headers, demonstrate how to use hmac signature here
            // 必需的请求头信息
            requestPost.addHeader("Authorization", authorization);
            requestPost.addHeader("X-Requested-By", vendorId);  // 重要：必须使用 vendorId
            requestPost.addHeader("X-MARKET", "KR");  // KR=韩国市场，TW=台湾市场
            /********************************************************/
            requestPost.addHeader("Content-Type", "application/json");
            requestPost.setEntity(params);
            
            System.out.println("\n请求头信息:");
            System.out.println("X-Requested-By: " + vendorId);
            System.out.println("X-MARKET: KR");
            System.out.println("请求 URL: " + uriBuilder.build().toString());
            System.out.println("\n请求 JSON 数据:");
            System.out.println(strjson);
            
            CloseableHttpResponse response = null;
            try {
                //execute post request
                System.out.println("\n发送商品注册请求...");
                response = client.execute(requestPost);
                //print result
                System.out.println("\n=== 响应结果 ===");
                System.out.println("status code: " + response.getStatusLine().getStatusCode());
                System.out.println("status message: " + response.getStatusLine().getReasonPhrase());
                HttpEntity entity = response.getEntity();
                String result = EntityUtils.toString(entity);
                System.out.println("result: " + result);
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                if (response != null) {
                    try {
                        response.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (client != null) {
                try {
                    client.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

    public static void main(String[] args) {
        System.out.println("========================================");
        System.out.println("Coupang 商品注册 API 测试");
        System.out.println("========================================\n");
        
        System.out.println("✅ 使用官方完整模板（包含所有必填字段和扩展字段）");
        System.out.println("\n📋 配置详情：");
        System.out.println("   【基本信息】");
        System.out.println("   - displayCategoryCode: 66482 (美妆-卸妆油)");
        System.out.println("   - brand, generalProductName, productGroup: ✅已添加");
        System.out.println("   - manufacture: 아모레퍼시픽");
        System.out.println("\n   【配送信息-完整必填字段】");
        System.out.println("   - deliveryMethod: SEQUENTIAL");
        System.out.println("   - deliveryCompanyCode: KDEXP");
        System.out.println("   - deliveryChargeType: FREE (免运费)");
        System.out.println("   - deliveryCharge: 0");
        System.out.println("   - freeShipOverAmount: 0");
        System.out.println("   - deliveryChargeOnReturn: 2500");
        System.out.println("   - remoteAreaDeliverable: N");
        System.out.println("   - unionDeliveryType: UNION_DELIVERY");
        System.out.println("\n   【退货地址信息-完整必填字段】");
        System.out.println("   - returnCenterCode: 1002336951 ⚠️请修改为您的真实代码");
        System.out.println("   - returnChargeName: 반품지_1");
        System.out.println("   - companyContactNumber: 02-1234-5678 ⚠️请修改");
        System.out.println("   - returnZipCode: 06236 ⚠️请修改");
        System.out.println("   - returnAddress: 서울특별시 강남구 테헤란로 ⚠️请修改");
        System.out.println("   - returnAddressDetail: 123호 ⚠️请修改");
        System.out.println("   - returnCharge: 2500");
        System.out.println("   - outboundShippingPlaceCode: 1002336951 ⚠️请修改");
        System.out.println("\n   【商品项(Items)】");
        System.out.println("   - Item 1: 200ml_1개 (10000韩元)");
        System.out.println("   - Item 2: 200ml_2개 (20000韩元)");
        System.out.println("   - extraProperties: ✅已添加 (coupangSalePrice等)");
        System.out.println("   - images: ✅3张图片 (1张主图+2张详情图)");
        System.out.println("   - notices: ✅11个化妆品公告");
        System.out.println("\n📖 参考：https://developers.coupangcorp.com/hc/zh-cn/articles/360033877853");
        System.out.println("\n⚠️ 重要：使用前必须修改以下信息为您的真实数据：");
        System.out.println("   1. returnCenterCode & outboundShippingPlaceCode");
        System.out.println("      → 运行 ReturnCenterList.java 获取您的真实代码");
        System.out.println("   2. 退货地址信息 (电话、邮编、地址)");
        System.out.println("   3. vendorUserId: 当前为 'zoejnson'");
        System.out.println("\n🚀 准备测试商品注册...\n");
        
        ProductRegistration productRegistration = new ProductRegistration();
        productRegistration.registerProduct();
        
        System.out.println("\n========================================");
        System.out.println("测试完成");
        System.out.println("========================================");
    }
}

